home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ham Radio 2000
/
Ham Radio 2000.iso
/
ham2000
/
logs
/
logbook
/
contest.tb
< prev
next >
Wrap
Text File
|
1990-04-22
|
12KB
|
210 lines
DEFINT A-Z
MClr = 15 : MClrBG = 1 : PClr = 14 : PClrBG = 4 : KClr = 2: KClrBG = 8
LClr = 14 : LClrBG = 1 : WClr = 30 : WcLRbg = 4 : QClr = 15 : QClrBG = 4
SCLR = 14 :SCLRBG = 5 :
color MClr,MClrBG
10 ON ERROR GOTO 1200
20 KEY OFF:G$="PC-HAM CONTEST LOGGING PROGRAM Version 3.42 (c) G3ZCZ 1990 "
CLS:WIDTH 80:PRINT G$:PRINT
:PRINT "IF TIME IS NOT SET TO UTC, STOP NOW AND SET THE CLOCK IN DOS"
30 K1=0: Print
40 BANDS=8:M9=4000:DIM W$(M9),F1(M9),B(BANDS),B1(BANDS):R1$="00":S1$="599":C$="?"
50 BLANK$=" "
Bar$= "════════════════════════════════════════════════════════════════════"
DIM CL$(10) : SPOS = 1 : srow = 40
60 C4$="RXWBMCFL*/Q?OP+G":L0$=BLANK$:QS$="-":QR$=QS$:R$=R1$:S$=S1$:L1$=L0$:L2$=L0$:L3$=L0$:L4$=L0$
70 L5$=L0$:L6$=L0$:L7$=L0$:L8$=L0$:L13$=L0$:L12$=L0$:L11$=L0$:L10$=L0$:L9$=L0$
80 FOR I%=1 TO BANDS:READ B(I%):NEXT:DATA 1,4,16,64,256,1024,4096,16384
90 FOR I%=1 TO BANDS:READ B1(I%):NEXT:DATA 10,15,20,40,80,160,2,6
100 color PClr, PClrBG
INPUT "Enter name of lOG file (D:NAME) Log type .LOG Assumed ",L$:IF L$="" THEN 100
110 GOSUB 880
120 GOSUB 930: color MClr,MClrBG : CLS
130 OPEN L$+".$$$" FOR OUTPUT AS #2
140 OPEN L$+".LOG" FOR INPUT AS #1:GOTO 160
150 GOSUB 420 :GOSUB 430 :GOSUB 460:GOTO 1000
160 LOCATE 23,1:PRINT "LOADING LAST ENTRY STRINGS":OPEN L$+".CHK" FOR INPUT AS #3
170 INPUT#3,L13$,L12$,L11$,L10$,L9$,L8$,L7$,L6$,L5$,L4$,L3$,L2$,L1$:CLOSE#3
180 PRINT "OPENING LOGBOOK ";L$: N4=0
190 IF EOF(1) THEN INPUT"Waiting,touch ENTER to continue ";A$:GOSUB 470:GOTO 1000
200 INPUT#1,D$,T$,B$,C$,R$,S$,M$,P$,QS$,QR$,X$ : PRINT N4,C$,X$:
IF C$="/*" THEN N4=N4-1 ELSE N4=N4+1
210 IF C$="/*" THEN C$=C8$:GOSUB 300:W$(J)=" ":F1(J)=F1(J)-B(B%):C$="/*":GOTO 240
220 GOSUB 300:W$(J)=C$:F=VAL(B$):FOR Q%=1 TO BANDS:IF INT(F)=B1(Q%) THEN F1(J)=F1(J)+B(Q%):B%=Q%:GOTO 240
230 NEXT
240 C8$=C$:WRITE#2,D$;T$;B$;C$;R$;S$;M$;P$;QS$;QR$;X$:GOTO 190
250 COLOR PClr, PClrBG:LOCATE 20,1:PRINT BLANK$;" ":LOCATE 20,1:RETURN
260 L0$=BLANK$:MID$(L0$,6)=D$:MID$(L0$,15)=T$:MID$(L0$,20)=C$:MID$(L0$,32)=B$:MID$(L0$,36)=M$:MID$(L0$,40)=P$
270 IF C$="/*" THEN MID$(L0$,1)="-" ELSE N4$=STR$(N4):MID$(L0$,1)=MID$(N4$,2)
280 MID$(L0$,45)=R$:MID$(L0$,49)=S$:MID$(L0$,53)=QS$:MID$(L0$,55)=QR$:MID$(L0$,57)=X$:RETURN
290 T$=LEFT$(TIME$,2)+MID$(TIME$,4,2):D$=RIGHT$(DATE$,2)+"/"+LEFT$(DATE$,2)+"/"+MID$(DATE$,4,2):RETURN
300 J=0:IF C$="/*" THEN 380
310 FOR I%=1 TO LEN(C$):A$=MID$(C$,I%,1):J=J+(ASC(A$)-47):NEXT:J=J*ASC(LEFT$(C$,1)):IF J<0 THEN J=0
320 IF J>M9 THEN J = J-M9 : GOTO 320
330 IF LEN(W$(J))<1 THEN 380
340 IF LEFT$(W$(J),1)=" " THEN 380
350 IF LEFT$(W$(J),LEN(C$))=C$ THEN 370
360 J=J+1:GOTO 320
370 I=0:RETURN
380 I=1:RETURN
390 PRINT "REPORT RECEIVED - "+S1$+"+" ;
INPUT A$:IF A$="" THEN 400 ELSE X$=S1$+A$
400 RETURN
410 GOSUB 250:INPUT "REPORT SENT ";S$:IF S$>"599" THEN 410 ELSE RETURN
420 GOSUB 250:INPUT "POWER (watts) ";P$:IF P$<"0" THEN 420 ELSE RETURN
430 GOSUB 250:INPUT "BAND ";F : IF F>160 THEN 430
440 FOR I%=1 TO BANDS:IF INT(F)=B1(I%) THEN 450 ELSE NEXT: LOCATE 22,1:FOR I%=1 TO BANDS:PRINT B1(I%);" ";:NEXT:GOTO 430
450 B$=MID$(STR$(F),2):B%=I%:GOSUB 730:RETURN
460 GOSUB 250:INPUT "MODE ";M$: IF M$="" THEN 460
470 IF M$="SSB" THEN S1$="59" ELSE S1$="599"
480 RETURN
490 GOSUB 250:INPUT "CALL SIGN ";A$ : JOE = 0: GOTO 500
495 GOSUB 250:INPUT "WHICH NUMBER (0-9) ";I
IF I>10 OR I<0 THEN A$= "" ELSE A$ = CL$(I) : JOE = 1
500 IF A$="" THEN 580 :
502 IF LEFT$(A$,4)="CALL" THEN 490
IF LEFT$(A$,1)="" THEN A$=LEFT$(A$,LEN(A$)):GOTO 500
IF JOE = 1 THEN 510
FOR I = 0 TO 9 : IF CL$(I) = A$ THEN 510 ELSE NEXT I
'IF CL < 10 THEN CL$(CL) = A$ : CL = CL+1 : GOTO 509
FOR I = 1 TO 9 : CL$(I-1) = CL$(I) : NEXT I :
IF LEN(A$) > 10 THEN A$ = LEFT$(A$,10)
CL$(9) = A$
509 GOSUB 1635
510 LOCATE 22,1:PRINT BLANK$;" ": LOCATE 22,1:C$=A$:GOSUB 300:IF I=0 THEN 530
520 PRINT "OK":GOTO 580
530 F2=F1(J): COLOR Wclr, Wclrbg : PRINT "WORKED on ";
540 FOR Q%=BANDS TO 1 STEP -1: IF F2<B(Q%) THEN 570
550 PRINT B1(Q%);" ";:F2=F2-B(Q%):
IF B1(Q%)=INT(F) THEN PRINT "DUPLICATE";CHR$(7);
560 IF F2>=B(Q%) THEN 540
570 NEXT
580 cOLOR MClr ,MClrBG: IF P2=1 THEN LPRINT C$
590 RETURN
600 GOSUB 250:INPUT "ARE YOU SURE ";A$ :IF A$="" THEN RETURN
610 IF N4=<1 THEN GOSUB 250 : PRINT "CAN'T F***** A ZERO ENTRY":RETURN
620 IF A$=""OR LEFT$(A$,1) <> "Y" THEN RETURN
630 C$=C8$:GOSUB 300:F1(J)=F1(J)-B(B%):IF F1(J)<=0 THEN W$(J)=" "
640 C$="/*":GOTO 680
650 IF LEN(X$)=0 THEN 660 ELSE IF LEFT$(C$,1)="?" THEN 660 ELSE 670
660 COLOR Wclr, Wclrbg: LOCATE 22,1:PRINT "GET THE DATA FIRST";CHR$(7);:RETURN
670 GOSUB 290:C8$=C$:GOSUB 300: F1(J)=F1(J)+B(B%):W$(J)=C$:GOSUB 1070
680 WRITE#2,D$;T$;B$;C$;R$;S$;M$;P$;QS$;QR$;X$
690 IF C$="/*" THEN 700 ELSE N4=N4+1:GOTO 710
700 N4=N4-1:IF N4<1 THEN N4=1
710 GOSUB 260:L13$=L12$:L12$=L11$:L11$=L10$:L10$=L9$:LOCATE 1,5:PRINT G$
720 L9$=L8$:L8$=L7$:L7$=L6$:L6$=L5$:L5$=L4$:L4$=L3$:L3$=L2$:L2$=L1$:L1$=L0$:IF P1 = 1 THEN LPRINT L0$
730 GOSUB 740:C$="?":R$=R1$:S$=S1$:X$="":RETURN
740 COLOR LClr,LClrBG
I=3:GOSUB 780:PRINT L13$:I=4:GOSUB 780:PRINT L12$:I=5:GOSUB 780:PRINT L11$:I=6:GOSUB 780:PRINT L10$
750 I=7:GOSUB 780:PRINT L9$:I=8:GOSUB 780:PRINT L8$:I=9:GOSUB 780:PRINT L7$:I=10:GOSUB 780:PRINT L6$
760 I=11:GOSUB 780:PRINT L5$:I=12:GOSUB 780:PRINT L4$:I=13:GOSUB 780:PRINT L3$:I=14:GOSUB 780:PRINT L2$
770 I=15:GOSUB 780:PRINT L1$:
' COLOR PClr, PClrBG :
GOSUB 1635: RETURN
780 LOCATE I,1:PRINT "║";BLANK$;"║"; :LOCATE I,2: PRINT ; : RETURN
790 GOSUB 250:INPUT "ARE YOU SURE ";A$:IF A$="" THEN RETURN
800 IF LEFT$(A$,1)<>"Y" THEN RETURN
810 CLS:PRINT "SAVING LAST ENTRY STRINGS BEFORE CLOSING":OPEN L$+".CHK" FOR OUTPUT AS #3
820 WRITE#3,L13$;L12$;L11$;L10$;L9$;L8$;L7$;L6$;L5$;L4$;L3$;L2$;L1$
830 CLOSE#3:CLOSE#1:CLOSE#2
840 KILL L$+".BAK"
850 NAME L$+".LOG" AS L$+".BAK"
860 NAME L$+".$$$" AS L$+".LOG"
870 GOTO 1350 : REM END
880 INPUT "Do you want a running log printed out (Y/N) "; A$: IF A$="" THEN 880
890 IF LEFT$(A$,1)="Y" THEN P1 = 1 ELSE IF LEFT$(A$,1)="N" THEN P1 = 0 ELSE 880
900 INPUT "Do you want CALL SIGNS printed out (Y/N) "; A$: IF A$="" THEN 900
910 IF LEFT$(A$,1)="Y" THEN P2 = 1 ELSE IF LEFT$(A$,1)="N" THEN P2 = 0 ELSE 900
920 RETURN
930 IF K1 = 1 THEN 970
940 KEY 1,"GRAB "+CHR$(13): KEY 2,"BAND "+CHR$(13):KEY 3,"CALL "+CHR$(13):KEY 4, "*QRT "+CHR$(13):KEY 5,"RPT RX "+CHR$(13)
950 KEY 6,"FUDGE "+CHR$(13): KEY 7,"XMT RPT"+CHR$(13):KEY 8,"/PX CHK"+CHR$(13):
KEY 9, "LOG "+CHR$(13):KEY 10,"+MORE "+CHR$(13): K1=1
960 GOTO 990
970 KEY 1,"WATTS "+CHR$(13): KEY 2,"MODE "+CHR$(13):KEY 3,"?CLN "+CHR$(13):KEY 4, "PRINT "+CHR$(13):KEY 5,"OOPS "+CHR$(13)
980 KEY 6," "+CHR$(13): KEY 7," "+CHR$(13):KEY 8," "+CHR$(13):
KEY 9, " "+CHR$(13):KEY 10,"+MORE "+CHR$(13): K1=0
990 color KClr, KClrBG : KEY ON: color MClr,MClrBG : RETURN
1000 GOSUB 1090: GOSUB 730 :GOSUB 470
1010 COLOR PClr, PClrBG: LOCATE 1,1:PRINT G$;L$
LOCATE 2,1: COLOR LClr,LClrBG
PRINT "╔═NR════DATE═══TIME═══CALL════BAND═MODE═PWR══RX══TX══Q═R══REPORT═════╗"
LOCATE 16,1:PRINT "╚";Bar$;"╝" :
COLOR QClr,QClrBG :LOCATE 19,1:PRINT "╚";Bar$;"╝"
1020 LOCATE 17,1:
PRINT "╔═════════════════════════CURRENT ENTRY══════════════════════════════╗"
GOSUB 290:GOSUB 260
1030 MID$(L0$,1)= STR$(N4+1): GOSUB 1080
1040 COLOR PClr, PClrBG: GOSUB 250:
INPUT "QRU ";A$:LOCATE 22,1:PRINT BLANK$;" ":IF A$=""THEN 1040
1050 FOR J2%=1 TO LEN(C4$):IF LEFT$(A$,1)=MID$(C4$,J2%,1) THEN 1060 ELSE NEXT:GOTO 1040
1060 GOSUB 250:
ON J2% GOSUB 390,410,420,430,460,490,600,650,790,1130,1080,1070,1370,880,930,495:GOTO 1010
1070 cOLOR MClr ,MClrBG:
LOCATE 21,1:PRINT BLANK$;" ":PRINT BLANK$;" ":PRINT BLANK$;" ":RETURN
1080 LOCATE 18,1:COLOR QClr,QClrBG : PRINT "║";L0$; "║":
color MClr,MClrBG : RETURN
1090 color MClr,MClrBG : CLS: color KClr, KClrBG : KEY ON: color MClr,MClrBG : RETURN
1130 GOSUB 250:INPUT "ARE YOU SURE ";A$:IF A$="" THEN RETURN
1140 INPUT "WHICH PREFIX ";A$:IF LEN(A$)<1 THEN A$="*"
1150 color PClr,PClrBG :CLS:LOCATE 2,1:PRINT Bar$ :LOCATE 1,1:PRINT G$;L$
LOCATE 3,1
1160 I%=0:FOR Q=1 TO M9:IF LEN(W$(Q))<=2 THEN 1190
1170 IF A$="*" THEN 1180 ELSE IF A$=LEFT$(W$(Q),LEN(A$)) THEN 1180 ELSE 1190
1180 PRINT W$(Q),:I%=I%+1:IF I%=4 THEN I%=0:PRINT
1190 NEXT:PRINT:INPUT "READY WHEN YOU ARE, HIT ENTER TO CONTINUE";A$:
GOSUB 1090:GOSUB 740:RETURN
1200 IF ERR = 64 OR ERR = 67 THEN PRINT "BAD FILE NAME ERROR" : GOTO 1640
1210 IF ERL = 140 THEN OPEN L$+".LOG" FOR OUTPUT AS #3:CLOSE#3:OPEN L$+".LOG" FOR INPUT AS #1:RESUME 150
1220 IF ERR = 61 THEN PRINT "Yuk Yuk Yuk DISK FULL ERROR - You may have blown it" :GOTO 1640
1230 IF ERL=160 THEN PRINT "CHECK LIST ERROR, RECOVERING....":RESUME 180
1240 IF ERL = 580 THEN PRINT "PRINTER ERROR, ABORTING PRINTING":RESUME 590
1250 IF ERL = 720 THEN RESUME 730
1260 IF ERL = 840 THEN RESUME 850
1270 IF ERL = 1610 AND ERR = 70 THEN PRINT "DISK WRITE PROTECT ERROR":GOTO 1640
1280 IF ERR = 62 AND ERL = 200 THEN GOSUB 730:INPUT"Waiting,touch ENTER to continue ";A$:RESUME 1000
1290 IF ERR = 53 THEN PRINT "LOG FILE DOES NOT EXIST ON DEFAULT DISK DRIVE":GOTO 1640
1300 IF ERR = 72 THEN PRINT "DISK MEDIA ERROR":GOTO 1640
1310 IF ERR = 71 THEN PRINT "DISK NOT READY ERROR":GOTO 1640
1320 IF ERR = 58 THEN 1640
1330 PRINT "ERROR ";ERR;" AT LINE ";ERL:CLOSE:GOTO 1640
1340 REM RESUME 750:REM CLOSE DOWN IN AN ORDERLY MANNER
1350 INPUT "Is the contest over (Y/N) ";A$: IF LEN(A$)<1 THEN 1350
1360 IF LEFT$(A$,1)="Y" THEN 1390 ELSE 1640
1370 INPUT "What is the number of lost calls (to be added to the memory) ";O:IF O <0 THEN 1370
1380 N4 = N4+O : RETURN
1390 PRINT "CONVERTING (CLEANING UP) CONTEST LOG TO STANDARD LOG"
1400 OPEN L$+".LOG" FOR INPUT AS #1
1410 OPEN L$+".$$$" FOR OUTPUT AS #2
1420 INPUT "Do you want the contacts numbered (Y/N) ";AA$: IF LEN(AA$)=0 THEN 1420
1430 IF LEFT$(AA$,1)="Y" THEN N0=1 ELSE N0=0:IF LEFT$(AA$,1)<>"N" THEN 1420
1440 INPUT "What is the name of the contest ";X$
1450 N=1:T$=" ":B$=" ":C$="-CONTEST":R$=" ":S$=" ":P$=" ":QS$=" ":QR$=" ":GOSUB 1610
1460 IF EOF(1) THEN 1520 ' GET FIRST ENTRY
1470 GOSUB 1570:GOSUB 1580:IF C1$="/*" THEN GOSUB 1630: GOTO 1460 'REM DONT SAVE FUDGE FLAG OR PREVIOUS LINE
1480 IF EOF(1) THEN 1510 ' GET SUBSEQUENT ENTRIES
1490 GOSUB 1570:IF C1$="/*" THEN GOSUB 1630:GOTO 1460 'REM DONT SAVE FUDGE FLAG OR PREVIOUS LINE
1500 GOSUB 1590:GOSUB 1580:GOTO 1480
1510 GOSUB 1590:PRINT :PRINT N9;"Entries were corrected/deleted"
1520 CLOSE#1 : CLOSE#2
1530 NAME L$+".LOG" AS L$+".RUN"
1540 NAME L$+".$$$" AS L$+".LOG"
1550 GOTO 1640
1560 REM SUBROUTINES FOLLOW
1570 INPUT#1,D1$,T1$,B1$,C1$,R1$,S1$,M1$,P1$,QS1$,QR1$,X1$:RETURN
1580 D$=D1$:T$=T1$:B$=B1$:C$=C1$:R$=R1$:S$=S1$:M$=M1$:P$=P1$:QS$=QS1$:QR$=QR1$:X$=X1$:RETURN
1590 R$=MID$(X$,1,3):X$=MID$(X$,4,LEN(X$))
IF LEN(S1$) = 3 THEN 1600 ' ELSE TRANSFER LAST DIGIT FROM R TO X
X$ = RIGHT$(R$,1)+X$ : R$=MID$(R$,1,2)
1600 IF N0=1 THEN N$=STR$(N):N$=MID$(N$,2):X$=N$+"-"+X$:N=N+1
1610 WRITE#2, D$;T$;B$;C$;R$;S$;M$;P$;QS$;QR$;X$
1620 PRINT D$;TAB(10);T$;TAB(15);C$;TAB(26);B$;TAB(30);R$;TAB(34);S$;TAB(38);M$;TAB(43);P$;TAB(48);QS$;TAB(50);QR$;TAB(52);X$:RETURN
1630 N9=N9+1:PRINT "ENTRY with ";C$;" DELETED":RETURN
1635 COLOR SCLR,SCLRBG: LOCATE SPOS+3, srow: PRINT "╔══CALL STACK══╗"
FOR I = 0 TO 9 : LOCATE SPOS+ I+4, srow: PRINT "║ ║"
LOCATE SPOS+ I+4, srow+1: PRINT 9-I;" ";CL$(9-I): NEXT I :
LOCATE SPOS+ I+4, srow: PRINT "╚══════════════╝"
COLOR PClr, PClrBG:RETURN
1640 COLOR 15,0 : CLS: END